package com.barbeque.mall.controller;

import com.barbeque.mall.bean.BaseRespVo;
import com.barbeque.mall.bean.param.CommonData;
import com.barbeque.mall.bean.region.MarketRegion;
import com.barbeque.mall.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Tezel
 * @since 2022/07/15 20:28
 */

@RestController
@RequestMapping("admin/region")
public class AdminRegionController {

    @Autowired
    RegionService regionService;

    @RequestMapping("list")
    public BaseRespVo list() {
        CommonData<MarketRegion> data = regionService.query();
        BaseRespVo baseRespVo = BaseRespVo.ok(data);
        baseRespVo.setErrmsg("成功");

        return baseRespVo;
    }


}
